<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Comicblocks - <?php echo $pageTitle ?> </title>
<?php

?>
<link href='http://fonts.googleapis.com/css?family=Doppio+One' rel='stylesheet' type='text/css'>
	<!-- Main CSS -->
	<link rel="stylesheet" type="text/css" href="css/themes/style_black_v1.css" >
	<link rel="stylesheet" href="css/slider_1/slider_1_style.css" type="text/css" media="screen"/>

	

	
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>

	
	<!-- Main Widget Includes -->
	<link type="text/css" href="css/widgets/main-widgets.css" rel="stylesheet" />
	<script type="text/javascript" src="scripts/widgets/main-widgets.js"></script>
	
	<!--- Script for login and browse menu popup --->
	<script>
		  $(document).ready(function(){
			  
				$('#login-trigger').hover(function(){
					$('#browse-trigger').next('#browse-content').slideUp();
				})
				$('#login-trigger').click(function(){
					$(this).next('#login-content').slideToggle();
					$(this).toggleClass('active');					
					
					if ($(this).hasClass('active')) $(this).find('span').html('&#x25B2;')
						else $(this).find('span').html('&#x25BC;')
					})
					
				$('#browse-trigger').mouseenter(function(){
					$('#browse-trigger').next('#browse-content').slideDown();
					$('#login-trigger').next('#login-content').slideUp();

					})
	
				$('#browse-content').mouseleave(function(){
					$('#browse-trigger').next('#browse-content').slideUp();
					if (!$('#login-trigger').hasClass('active'))
					$('#login-trigger').next('#login-content').slideDown();

					})
					
				$('#usr-menu').click(function() {
				
					$('#usr-drop').slideToggle();
				
				});
			    
		  });
		  
		  
	</script>
	

</head>

<body>
<!--- Connect to Database --->
<?php include_once "db.connection.php"; ?>
	
    <header id= "main_header">
        <div id="navig">
        	
           <nav>
               
				
        <ul>
        
 
				<?php if(isset($_SESSION['LoggedIn']) && isset($_SESSION['Username'])&& $_SESSION['LoggedIn']==1):?>
				<li>
                        <a id ="usr-menu" href="#"></a>
                        <div id="usr-drop">
							<div><ul>
                            	<li> <a href="author_page.php">Author Page</a> </li>
								<li> <a href="index.php">Back</a> </li>
								 <li> <a href="logout.php"><span aria-hidden="true" data-icon="&#xe007;"> Log Out</a> </li> 
                            </ul></div>
                        </div>
                        
                </li>
				
				<?php else: ?>
				
                <li id="login">
						
                        <a id="login-trigger" href="#">
                                Login <span>▼</span>
                        </a>
                        <div id="login-content">
                                <form method="post" action="login.php" name="loginform" id="loginform">
                                        <fieldset id="inputs">
                                                <input id="username" type="email" name="email" placeholder="Your email address" required>
                                                <input id="password" type="password" name="password" placeholder="Password" required>
                                        </fieldset>
                                        <fieldset id="actions">
                                                <input type="submit" id="submit" value="Log in">
                                               
                                               
                                        </fieldset>
                                </form>
                        </div>
                </li>
				<li>
				<a id="sign" href="signup.php">Sign up</a>
				</li>
				<?php endif; ?>
				
        </ul>
</nav>
     </div>
    </header>
	